﻿@model IEnumerable<JewererBasic.STONE_EXPORTSTAFF>

<h2>Staff Export List</h2>

@{
    ViewBag.Title = "";

    var gd = new WebGrid(
            Model,
            canPage: true,
            rowsPerPage: 10,
            selectionFieldName: "selectedRow",
            ajaxUpdateContainerId: "gridContent"
        );
    gd.Pager(WebGridPagerModes.NextPrevious);

    JewererBasic.STONE_EXPORTSTAFF se;
}

<fieldset>
    <a href="/Stone/TestingExport">
        <input type="button" value="CREATE" />
    </a>

    <p></p>

    <div id="stoneListDiv">
        @gd.GetHtml(
    tableStyle: "table",
    headerStyle: "head",
    rowStyle: "row",
    alternatingRowStyle: "altRow",
    selectedRowStyle: "selectRow",
    columns: gd.Columns(
    gd.Column(header: "Id", format: @<div style="width: 200px; text-align: center;"><span><span id="spanId_@item.IdExport">@item.IdExport</span></span></div>),
    gd.Column(header: "Date", format: @<div style="width: 200px; text-align: center;"><span><span id="spanDate_@item.IdExport">@item.DayMake</span></span></div>),
    gd.Column(header: "Exporter", format: @<div style="width: 200px; text-align: center;"><span><span id="spanCreater_@item.IdExport">@item.IdCreater</span></span></div>),
    gd.Column(header: "Worker", format: @<div style="width: 200px; text-align: center;"><span><span id="spanWorker_@item.IdExport">@item.EMPLOYEE.Staff_Id</span></span></div>),
    gd.Column(header: "Status", format: @<div style="width: 200px; text-align: center;"><span><span id="spanStatus_@item.IdExport">@(item.IsFinish == 1 ? "Finished" : "Started")</span></span></div>),
    gd.Column(header: "Action", format: @<div style="width: 200px; text-align: center;"><span><span id="spanAction_@item.IdExport">@Html.ActionLink("Detail", "TestingExportUpdate", new { id = item.IdExport })</span></span></div>)
))
    </div>
</fieldset>
